import Taro from "@tarojs/taro";
// import { request, createSelectorQuery ,getSystemInfoSync} from "@tarojs/taro-h5";

// Taro.request = request;
// Taro.getEnv = () => Taro.ENV_TYPE.WEB;
// Taro.getSystemInfoSync = () => {
//   return { statusBarHeight: 0 } as any;
// };
// Taro.createSelectorQuery = createSelectorQuery;
import * as TaroH5 from "@tarojs/taro-h5";
import * as TaroReact from "@tarojs/plugin-framework-react/dist/runtime.js";
import * as TaroRouter from "@tarojs/router/dist/";
// import React from "react";
// import ReactDOM from "react-dom";

// import ReactDOMClient from "react-dom/client";
// import AppMain from "./AppMain";
// import RouteIndex from "./RouteIndex";
// import { createReactApp, defineCustomElement } from '@tarojs/plugin-framework-react/dist/runtime';
// import { createHashHistory, handleAppMount, createRouter } from '@tarojs/router';

// TaroReact.createH5NativeComponentConfig({}, React, ReactDOM);
// const history = TaroRouter.createHashHistory();
// const routerMode = "hash";
// const config = {
//   routes: [
//     {
//       path: "/pages/index/index",
//     }
//   ],
//   router: { mode: routerMode },
// };
// TaroRouter.handleAppMount(config, history, "root");
// TaroRouter.createRouter(history,{}, config)

// TaroRouter.setHistoryMode(routerMode);

// console.log(TaroReact)

// Taro.useRouter = (dynamic?: boolean) => {
//   dynamic;
//   // return {} as any;
//   return Taro.Current.router as any
// };

export default {
  ...Taro,
  ...TaroH5,
  ...TaroReact,
  ...TaroRouter,
};
